const express = require('express')
const router = express.Router()
const sendMail = require('../module/mail.js')

router.get('/', (req, res) => {
    console.log('111111',req.query);
    console.log(req.params);
    res.send("get成功了")
})

router.post('/', (req, res) => {
    let email = req.body.email;
    let title = "fxlink 验证码";
    let html = "154632"

    sendMail(email, title, html, (err, info) => {
        if (err) {
            return console.log(err);
        }
        console.log(info);
    });

    res.send("post成功了")
})

module.exports = router
